package meterMonitor.mapper;

import meterMonitor.model.Monitor;
import meterMonitor.model.MonitorMonth;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface MonitorMonthMapper {
    List<MonitorMonth> queryByTimeQuantum(Timestamp start, Timestamp end);


    List<MonitorMonth> query(MonitorMonth queryParam);

    //
    List<MonitorMonth> queryByDevice(@Param(value = "month") String month,@Param(value = "deviceTypeCode") int deviceTypeCode);

    MonitorMonth queryMeterByCode(@Param(value = "month") String month,@Param(value = "meterCode") Long meterCode);
    List<MonitorMonth> queryElectricity(MonitorMonth queryParam);

    //查出月份水表的间隔使用量
    List<MonitorMonth> countByMonth(MonitorMonth queryParam);
    //查出月份电表的间隔使用量
    List<MonitorMonth> countElectricityByMonth(MonitorMonth queryParam);





    List<String> queryTimeQuantum(String start, String end);

    MonitorMonth queryOne(MonitorMonth monitorMonth);

    List<MonitorMonth> queryData(@Param("fromTime") String fromTime, @Param("toTime") String toTime, @Param("codes") String codes);

    List<MonitorMonth> queryDataByMonth(@Param("fromTime") String fromTime,@Param("toTime") String toTime,@Param("areaId") String areaId,@Param("deviceTypeCode") int deviceTypeCode,@Param("codes") String codes);
    //这个暂时没有用到，用到会标注
    List<MonitorMonth> queryDataByType(@Param("fromTime") String fromTime, @Param("toTime") String toTime, @Param("codes") String codes,int type);


    List<MonitorMonth> queryByMonth(String month);

    List<MonitorMonth> queryByMonth1(String month,@Param("deviceTypeCode") int deviceTypeCode);

    List<MonitorMonth> queryElectricityByMonth(String month);

    List<MonitorMonth> queryMeterByMonth(@Param("month")String month,@Param("deviceTypeCode")int deviceTypeCode);

    MonitorMonth getCurrentByMeterCode(Long meterCode);
}
